package com.xyy.saas.payment.service.impl;

import com.xyy.saas.payment.dao.mapper.FmBankCodeMapper;
import com.xyy.saas.payment.dao.model.FmBankCode;
import com.xyy.saas.payment.service.FmBankCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FmBankCodeServiceImpl implements FmBankCodeService {

    @Autowired
    private FmBankCodeMapper fmBankCodeMapper;

    @Override
    public String queryCodeByName(String name) {
        FmBankCode fmBankCode = fmBankCodeMapper.queryByName(name);
        if(null != fmBankCode) {
            return fmBankCode.getCode();
        }
        return "";
    }

    @Override
    public List<FmBankCode> queryAll() {
        return fmBankCodeMapper.queryAll();
    }
}
